#include "pch.h"

#include "threading/win32/win32criticalsection.h"



namespace Win32
{

	///
	Win32CriticalSection::Win32CriticalSection()
	{
		InitializeCriticalSectionAndSpinCount(&this->m_critSec, 4096);
	}


	///
	Win32CriticalSection::~Win32CriticalSection()
	{
		DeleteCriticalSection(&this->m_critSec);
	}





	///
	void Win32CriticalSection::Enter() const 
	{
		EnterCriticalSection(&this->m_critSec);
	}


	///
	void Win32CriticalSection::Leave() const 
	{
		LeaveCriticalSection(&this->m_critSec);
	}

}